package Day05;

import java.util.Random;

public class Test3 {
    public static void main(String[] args) {
       Random r=new Random();
       int[] arr=new int[6];
       int sum=0;
        for (int i = 0; i < arr.length; i++) {
            arr[i]=r.nextInt(100)+1;
            sum+=arr[i];
        }
        int a=sum/arr.length;
        System.out.println("数组元素平均值为："+a);
    }
}
